package com.electron.power.aio.common.exception;

import com.electron.power.aio.common.CommonConstants;

import lombok.Data;

/**
 * Created by ace on 2017/9/8.
 */
@Data
public class BizException extends BaseException {
	private static final long serialVersionUID = 1L;

	private Throwable e;

	public BizException(String message) {
		super(message, CommonConstants.COMMON_ERROR_CODE);
	}

	public BizException(String message, Throwable e) {
		super(message, CommonConstants.COMMON_ERROR_CODE);
		this.e = e;
	}

	public BizException(int status, String message) {
		super(message, CommonConstants.EX_USER_INVALID_CODE);
		this.setStatus(status);
	}
}
